Skip to content

NO TICKET: delete thing id links on deletion of thing#236

Merged
jirhiker merged 1 commit into
stagingfrom
jab-thing-id-link-cascade-fix
Nov 7, 2025
Merged

NO TICKET: delete thing id links on deletion of thing#236
jirhiker merged 1 commit into
stagingfrom
jab-thing-id-link-cascade-fix

Conversation

@jacob-a-brown

@jacob-a-brown jacob-a-brown commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • when a thing is deleted its child thing_id_links need to be deleted. If not, the thing_id field is NULL, which breaks the not-null constraint that comes from the foreign key

How

Implementation summary - the following was changed / added / removed:

  • add a reference to the thing_id_link table in the thing table and set cascade="all, delete-orphan"

Notes

Any special considerations, workarounds, or follow-up work to note?

  • Use bullet points here

@codecov-commenter

codecov-commenter commented Nov 7, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
db/thing.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

@jirhiker jirhiker merged commit 93893cb into staging Nov 7, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants